package com.chinasofti.exceptiondemo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/*
public static void 方法名() throws 异常类名 {

 */

public class Edemo2 {
    public static void main(String[] args) throws ParseException {
        method1();
    }

    private static void method1() throws ParseException {
        String s = "2023-05-05";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date d = sdf.parse(s);
    }


}
